package org.example.mine.controller;

import jakarta.annotation.Resource;
import org.example.mine.service.BillService;
import org.example.model.domain.mine.ExpressPaymentRecords;
import org.example.model.vo.mine.BillVo;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/bill")
public class BillController {


    @Resource
    public BillService billService;


    @GetMapping("/getbill/{registerIp}")
    public BillVo getMyWallet(@PathVariable("registerIp") Long registerIp){
        BillVo bill=billService.selectBillList(registerIp);
        return bill;
    }

    @GetMapping("/getbillbyid/{id}")
    public ExpressPaymentRecords getbillbyId(@PathVariable("id") Long id){
        ExpressPaymentRecords bill=billService.getbillbyId(id);
        return bill;
    }

    @GetMapping("/getDailyIncome/{registerIp}")
    public String getDailyIncome(@PathVariable("registerIp") Long registerIp){
        String DailyIncome=billService.getDailyIncome(registerIp);
        return DailyIncome;
    }
}
